package com.shb.jutils.pojo;

import java.util.List;

/**
 * 数据分页类
 * @author shb
 *
 * @param <T>
 */
public class PageList<T> {
	private int pageIndex;
	private int pageSize;
	private int totalCount;
	private int totalPage;
	private List<T> list;
	
	public int calcTotalPage(){
		totalPage = (totalCount + pageSize -1)/ pageSize;
		return totalPage;
	}
	
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}
	
	
}
